package com.doit.demo05;

public class Stident {
    private int age;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        if(age>200 || age<0)
        {
            throw new NoAgeException("年龄超过正常值(0-200)"+age);
        }
        this.age = age;
    }

    public Stident() {

    }

    public Stident(int age) {

        this.age = age;
    }
}
